package com.zha.boss.mvc.convert;

import com.zha.boss.dao.entity.PayProduct;
import com.zha.boss.mvc.models.vo.PayProductMatchVo;
import com.zha.boss.mvc.models.vo.PayProductVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring",uses = {UserConvert.class})
public interface ProductConvert {
    @Mappings({
            @Mapping(source = "editTime", target = "editTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "status", target = "status",qualifiedByName = "transStatus"),
    })
    PayProductVo toPayProductVo(PayProduct payProduct);
    List<PayProductVo> toListPayProductVo(List<PayProduct> payProducts);
    List<PayProductMatchVo> toListPayProductMatchVo(List<PayProduct> payProducts);

}
